package com.cuit.mimall;

import com.cuit.mimall.util.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author star
 */
@SpringBootApplication
@MapperScan("com.cuit.mimall.mapper")
public class MiMallServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(MiMallServerApplication.class, args);
    }

    @Bean
    public IdWorker getIdWork() {
        return new IdWorker();
    }

    @Bean
    public Queue queue() {
        return new Queue("seckill_order", true);
    }
}
